<template>
  <div>Login page</div>
  <button @click="doLogin">登录{{a}}</button>
  <button @click="testFn">测试方法</button>
</template>

<script>
// import {onMounted} from 'vue';
import api from '../api/api';
console.log("api",api);
export default {
  name: "Login",
  data(){
    return {
      a : 1
    }
  },
  setup(){
    let testFn = async ()=>{
      const res = await api.testFn();
      console.log("testFn",res);
      return res;
    }
    return {
      doLogin : api.doLogin,
      testFn
    }
  }
}
</script>

<style scoped>

</style>
